#include"AlgFloydPlugin.h" 
#include<stdio.h>

/*!
\file AlgFloydPlugin.cpp
\brief Contains implementation of AlgFloydPlugin.
\ingroup Plugins
*/

Algorithm *AlgFloydPlugin::createAlgorithm( Graph *g ){
	return new AlgFloyd(g);
}

bool AlgFloydPlugin::canAcceptGraph( Graph *g ){
	bool ok = true;
	for( int i = 0; i < g->numEdges() && ok; i++ ){
		g->edge(i).label().toInt(&ok);
	}
	for(int i = 0; i < g->numNodes(); i++){
		if( g->node(i).identifier() != i )
			return false;
	}
	return ok;
}

#include<QtGui>
Q_EXPORT_PLUGIN2(algfloydplugin, AlgFloydPlugin) 
 
